New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change in display of empty test names #84
Comments
I've not been following the 2.x stuff - so unsure whether this is a bug/feature. Should a description-free test be the same output as a test with description that's the empty string? |
It wasn't intentional. Its one of those little fiddly things. I call it a bug, if you passed in an empty string it should remain. |
That'll do it. Thanks @jkeenan. |
I decided to revert this. It's just too fiddly. When copying a name from one thing to another (such as using the subtest name as a result name) you have to be careful to preserve whether it's undef or empty string. This difference between undef and empty string creeps out. Object attributes now can't default to empty string. That means you have to check if strings are defined before you use them. Ugg. Sorry Adrian. |
It's just too fiddly. When copying names you have to check if the name is undefined/doesn't exists or just empty. Objects here like to default to empty string make it sometimes impossible to preserve an undefined name.
No need to apologies! Now I know it's a feature I can tweak accordingly :-) |
The plan is to write a legacy formatter that replicates all the current quirks (see #215) and make Test::Builder::Tester use that by default. |
The output of
perl -MTest::More\ no_plan -e 'ok(1, "")'
differs:pre 2.0:
ok 1 -
1..1
post 2.0
ok 1
1..1
Affected test:
http://github.com/adrianh/test-exception/blob/master/t/Exception.t#L157
Fail report:
http://www.cpantesters.org/cpan/report/2d689f4c-d059-11df-8a3a-04cc23cd16df
The text was updated successfully, but these errors were encountered: